/*
 * Copyright (c) 2015, FPX and/or its affiliates. All rights reserved.
 * Use, Copy is subject to authorized license.
 */
package com.fpx.open.platform.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.fpx.open.platform.dao.mapper1.InvokeLogMapper;
import com.fpx.open.platform.service.InvokeLogService;
import com.fpx.xms.api.base.model.InvokeLog;

/**
 * 调用日志服务实现类
 * @author shiwei
 * @date 2015年6月24日
 */
//@Service("invokeLogService")
public class InvokeLogServiceImpl implements InvokeLogService {

	@Resource
	private InvokeLogMapper invokeLogMapper;
	
	@Override
	public void addInvokeLog(InvokeLog invokeLog) {
		if(invokeLog.getId() == null){
			invokeLog.setId(Integer.valueOf(invokeLogMapper.getSequence("seq_api_invoke_log")));
		}
		this.invokeLogMapper.addInvokeLog(invokeLog);
	}

	@Override
	public String getSequence(String seqName) {
		return this.invokeLogMapper.getSequence(seqName);
	}

	@Override
	public void addInvokeLogAttach(InvokeLog invokeLog) {
		invokeLogMapper.addInvokeLogAttach(invokeLog);	
	}

}
